var _util = require('../util/util.js');
var _sidebar_service = {
    //侧栏索引搜索
    searchProducts: function (id, pagesize, pageid, sortby, resolve, reject) {
        let urlStr = '/catalog/categories/products/' + id + '/pages/' + pagesize + '/' + pageid + '?sortby=' + sortby;
        _util.request({
            url: _util.getServerURL(urlStr),
            method: 'GET',
            success: resolve,
            error: reject
        });
    },
}

module.exports = _sidebar_service;